{{#if name}}
  <h1 class="screenreader-only">{{name}}</h1>
{{else}}
  <h1 class="screenreader-only">{{#t}}New Assignment{{/t}}</h1>
{{/if}}

{{#if CONDITIONAL_RELEASE_SERVICE_ENABLED}}
<div class='edit-assignment-header-cr'>
  <div id="edit-assignment-header-cr-tabs" class="ui-tabs-minimal">
    <ul id="edit-assignment-header-cr-tab-nav">
      <li><a href="#edit_assignment_wrapper" id="edit_assignment_link">{{#t}}Details{{/t}}</a></li>
      <li><a href="#mastery-paths-editor" id="conditional_release_link">{{#t}}Mastery Paths{{/t}}</a></li>
      {{! this is a weird place for this, but we need to make this line up with the tabs}}
      <span id='edit-assignment-header-cr-spacer'></span>
      {{#if published}}
        <span id='assignment-draft-state-cr' class='published-status published'>
          {{> icons/publish}}
          {{#t}}Published{{/t}}
        </span>
      {{else}}
        <span id='assignment-draft-state-cr' class='published-status unpublished'>
          {{> icons/unpublished}}
          {{#t}}Not Published{{/t}}
        </span>
      {{/if}}

      {{#unless is_locked}} <!-- delete is only thing in menu, remove the whole thing if locked -->
        <span id='assignment-gear-button-cr'>
          <a role="button" class="al-trigger btn" href="#">
            <span class="screenreader-only">{{#t}}Manage Assignment{{/t}}</span>
            {{> icons/settings}}
          </a>
          <ul class="al-options">
            <li>
            {{#if canDelete}}
              <a href="#" class="delete_assignment_link">
            {{else}}
              <a href="#" class="delete_assignment_link disabled" aria-disabled=true>
            {{/if}}
                {{> icons/trash}}
                {{#t}}Delete{{/t}}
              </a>
            </li>
          </ul>
        <span>
      {{/unless}}

    </ul>
    <div id="edit-assignment-header-cr-tab-content">
      <form id="edit_assignment_form" class="form-horizontal bootstrap-form">
      </form>
    </div>
  </div>

</div>

{{else}}

<div class="header-bar-right">
  <div class="header-group-left">
    {{#if published}}
      <span id='assignment-draft-state' class='published-status published'>
        {{> icons/publish}}
        {{#t}}Published{{/t}}
      </span>
    {{else}}
      <span id='assignment-draft-state' class='published-status unpublished'>
        {{> icons/unpublished}}
        {{#t}}Not Published{{/t}}
      </span>
    {{/if}}
  </div>
  <div class="header-bar-right">
    {{#unless is_locked}} <!-- delete is only thing in menu, remove the whole thing if locked -->
      <div class="admin-links">
        <a role="button" class="al-trigger btn" href="#">
          <span class="screenreader-only">{{#t}}Manage Assignment{{/t}}</span>
          {{> icons/settings}}
        </a>
        <ul class="al-options">
          <li>
          {{#if canDelete}}
            <a href="#" class="delete_assignment_link">
          {{else}}
            <a href="#" class="delete_assignment_link disabled" aria-disabled=true>
          {{/if}}
              {{> icons/trash}}
              {{#t}}Delete{{/t}}
            </a>
          </li>
        </ul>
      </div>
    {{/unless}}
  </div>
</div>

<form id="edit_assignment_form" class="form-horizontal bootstrap-form">
</form>

{{/if}}
